﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CLCommuModbus
{
    internal enum ObjectHandShakeMode
    {
        //字符串长度   所占PLC地址长度 
        ObjectStringDataLength = 40
    }


    internal enum ObjectHandShakeMode2
    {
        StructStartAddress = 80,

        //280->200
        FlagAddress = 200,
        ObjectIDAddress = 201,

        ObjectDataLength = 120,    //80-199  120个地址长度
        TotalDataLength = 122,        //80-201  122个地址长度

        //object各类型的数据长度    所占PLC地址长度 
        ObjectStringDataLength = 40,
        ObjectIntDataLength = 2,
        ObjectFloatDataLength = 2,
        ObjectDoubleDataLength = 4,
        ObjectUshortDataLength = 1,

        //写入完成，标志位信号
        ObjectWriteFinishFlag = 2,


    }
    internal enum ObjectHandShakeMode1
    {
        StructStartAddress = 80,
        //object  string类型的长度
        ObjectStringDataLength = 40
    }
    internal enum ConstantHandShakeMode
    {
        StructStartAddress = 500,
        StructAddressLength = 5
    }
    internal enum HandShakeMode
    {
        HandShakeMode1,
        HandShakeMode2,
    }
    public enum DataType
    {
        //WORD,     //16位  ushort
        //DWORD,   //32位  uint   
        //DINT,    //32位  int
        //REAL,    //32位  float
        //LREAL,    //64位 double
        //STRING    //根据需求定

        USHORT,
        INT,
        FLOAT,
        DOUBLE,
        STRING
    }
    public enum Direction
    {
        PLCToTS,
        TSToPLC
    }


    

}
